﻿using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Media;

namespace Mongoose.Windows.Controls
{
    public class PathToggleButton : ToggleButton
    {
        static PathToggleButton()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(PathToggleButton), new FrameworkPropertyMetadata(typeof(PathToggleButton)));
        }

        public Geometry PathData
        {
            get { return (Geometry)GetValue(PathDataProperty); }
            set { SetValue(PathDataProperty, value); }
        }

        // Using a DependencyProperty as the backing store for PathData.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty PathDataProperty =
            DependencyProperty.Register("PathData", typeof(Geometry), typeof(PathToggleButton), new PropertyMetadata(null));

        public double StrokeThickness
        {
            get { return (double)GetValue(StrokeThicknessProperty); }
            set { SetValue(StrokeThicknessProperty, value); }
        }

        // Using a DependencyProperty as the backing store for StrokeThickness.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty StrokeThicknessProperty =
            DependencyProperty.Register("StrokeThickness", typeof(double), typeof(PathToggleButton), new PropertyMetadata(0.5D));
    }
}
